#!/usr/bin/env python
"""
Tetris Tk - A tetris clone written in Python using the Tkinter GUI library.

Controls:
    Left Arrow      Move left
    Right Arrow     Move right
    Down Arrow      Move down
    Space        Drop Tetronimoe to the bottom
    'e'             Rotate anti-clockwise (to the left)
    'r'             Rotate clockwise (to the right)
    'p'             Pause the game.
"""

from game_controller import *
       
def affiche (a):
    if a.__class__.__name__ == "list" :
        res = ""
        for i in a :
            res += affiche(i)
    else :
        res = str(a)+" "
    return res
        
def tetris ():
    root = Tk()
    root.title("Tetris PCA")
    theGame = game_controller( root ,  )
    root.mainloop()
    affiche (theGame.get_res())
    return theGame.get_res()
